// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function () {
    const table = {
        key: 'Id',
        footer: "Foots",
        cnName: '货品信息',
        name: 'productinformationmodel',
        url: "/demo/ProductInformation/",
        sortName: "CreateDate"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {};
    const editFormOptions = [];
    const searchFormFields = {};
    const searchFormOptions = [];
    const columns = [{ field: 'Id', title: '主键', type: 'bigint', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
    {
        field: 'goodsCode',
        title: '货品编号',
        type: 'string',
        width: 110,
        align: 'left',
        sort: true,
        link: true,
        formatter: (row, column, cellValue) => {
            return `<a href="javascript:void(0)" style="color: #409EFF; cursor: pointer; text-decoration: underline;">${cellValue || ''}</a>`;
        }
    },
    { field: 'goodsName', title: '货品名称', type: 'string', width: 110, align: 'left' },
    { field: 'status', title: '状态', type: 'sbyte', width: 110, align: 'left' },
    { field: 'productTypeId', title: '货品类型', type: 'int', width: 110, align: 'left' },
    { field: 'specModel', title: '规格型号', type: 'string', width: 110, align: 'left' },
    {
        field: 'supplierId',
        title: '供应商',
        type: 'select',
        width: 120,
        align: 'left',
        bind: {
            key: 'id',
            value: 'supplierName'
        }
    },
    { field: 'userId', title: '客户名称Id', type: 'int', width: 110, align: 'left' },
    { field: 'purchasePrice', title: '入库参考价/元', type: 'decimal', width: 110, align: 'left' },
    { field: 'salePrice', title: '出库参考价/元', type: 'decimal', width: 110, align: 'left' },
    { field: 'displayOrder', title: '显示顺序', type: 'int', width: 110, align: 'left' },
    { field: 'currentInventory', title: '当前库存', type: 'int', width: 110, align: 'left' },
    { field: 'totalInventoryamount', title: '库存总金额', type: 'decimal', width: 110, align: 'left' },
    { field: 'shelfLifeManagement', title: '保质期管理', type: 'sbyte', width: 220, align: 'left' },
    { field: 'shelfLife', title: '保质期时长（数值）', type: 'int', width: 110, align: 'left' },
    { field: 'shelfLifeUnit', title: '保质期单位（天/月/年）', type: 'string', width: 110, align: 'left' },
    { field: 'warningDays', title: '预警天数(天)', type: 'int', width: 110, align: 'left' },
    { field: 'notes', title: '备注', type: 'string', width: 110, align: 'left' },
    { field: 'IsDel', title: '删除标识', type: 'sbyte', width: 110, align: 'left' },
    { field: 'Creator', title: '创建人', type: 'string', width: 100, align: 'left' },
    { field: 'CreateDate', title: '创建时间', type: 'datetime', width: 150, align: 'left', sort: true },
    { field: 'Modifier', title: '修改人', type: 'string', width: 100, align: 'left' },
    { field: 'ModifyDate', title: '修改时间', type: 'datetime', width: 150, align: 'left', sort: true },
    { field: 'CreateID', title: '创建人id', type: 'int', width: 100, hidden: true, align: 'left' },
    { field: 'ModifyID', title: '修改人id', type: 'int', width: 100, hidden: true, align: 'left' },
    { field: 'UnitId', title: '单位外键', type: 'bigint', width: 120, align: 'left' }];
    const detail = { columns: [] };
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}